package com.ziJing.multithreading.sync.t_01_AQS;

import java.util.concurrent.locks.ReentrantLock;

/**
 * @program Multithreading
 * @description:
 * @author: zhangbo
 * @create: 2022/05/04 03:10
 */
public class TestReentrantLock {


    public static void main(String[] args) {
        int i = 0;
        ReentrantLock lock = new ReentrantLock();
        lock.lock();
        try{
            i++;
            System.out.println(i);
        } finally {
            lock.unlock();
        }
    }
}
